#!/bin/bash
string="I am oldboy teacher welcome to oldboy training class"
OLD_IFS=","
arr=($string)

echo "输入的句子为："$string
echo "对该句子进行划分后为："
for s in ${arr[@]}
do
echo "$s" 
done

echo "句子中长度不大于6的单词为："

for s in ${arr[@]}
do
    if [ ${#s} -lt 6 ]
    then 
    echo "$s""------->""${#s}"
    fi
done

